export default {
  namespaced: true,
  state: {
    username: '',
    menus: []
  },
  getters: {
    info: state => {
      return state
    }
  },
  //局部变化
  mutations: {
    username(state, username) {
      state.username = username
    },
    menus(state, menus) {
      state.menus = menus
    }
  },
  actions: {
    //局部动作
    updateInfo(context, newData) {
      context.commit('username', newData.name)
      // context.commit('menus', newData.menus)
    }
  }
}
